//
//  ViewController.swift
//  demoSwift
//
//  Created by DDC on 2017/9/12.
//  Copyright © 2017年 DDC. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let button = UIButton()
        
        button.setTitle("demo", for: [])
        button.setTitleColor(UIColor.blue, for: [])
        button.center = view.center
        button.sizeToFit()
        view .addSubview(button)
        
        button.addTarget(self, action: #selector(buttonClick), for: .touchUpInside)
        
    }

    
    func buttonClick()  {
        let vc = demoViewController()
        present(vc, animated: true, completion: nil)
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

